import threading
import requests

def t_main(url):
    res = requests.get(url)

    print(threading.current_thread().name, res.json())

def main():
    urls = [f'https://api.web.360kan.com/v1/rank?cat={i}' for i in range(1, 7)]
    threads = []
    print('开始启动线程')
    for url in urls:
        thread = threading.Thread(name=f'线程{url}',target=t_main, args=(url,))
        threads.append(thread)

        thread.start()

    for thread in threads:
        thread.join()

    print('所有线程执行完毕')

if __name__ == '__main__':
    main()